from dataclasses import dataclass
from typing import Optional

@dataclass
class ModelConfig:
    """模型配置类"""
    learning_rate: float = 0.001
    weight_decay: float = 0.0001
    max_position_ratio: float = 0.1
    margin_warning_ratio: float = 0.8
    var_limit: float = 0.05
    max_epochs: int = 100
    batch_size: int = 64
    early_stopping_patience: int = 10
    optimizer: str = "adam"
    loss_function: str = "mse"
    device: Optional[str] = None